﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WX.WMS.DataModel;

namespace WX.WMS.BLL
{
    public class StoreReportBLL : BaseBLL
    {
        public class VStoreView : Store_View
        {
            private string _StockType;

            public string StockType
            {
                get { return this._StockType; }
                set { this._StockType = value; }
            }
        }


        public IEnumerable<VStoreView> GetVStoreView()
        {
            var source = from t in new BaseDAO().Store_Views
                         select new VStoreView
                         {
                             AREA_ID = t.AREA_ID,
                             AREA_NAME = t.AREA_NAME,
                             BAR_CODE = t.BAR_CODE,
                             BigClass = t.BigClass,
                             BRAND = t.BRAND,
                             ClientName = t.ClientName,
                             CODE = t.CODE,
                             FloorID = t.FloorID,
                             FloorName = t.FloorName,
                             GROSS_WEIGHT = t.GROSS_WEIGHT,
                             InStock_Date= t.InStock_Date,
                             InventoryDay = t.InventoryDay,
                             KeyStandard = t.KeyStandard,
                             LOT_NUMBER = t.LOT_NUMBER,
                             MODEL = t.MODEL,
                             NET_WEIGHT = t.NET_WEIGHT,
                             ORIGIN = t.ORIGIN,
                             PACKET_NO = t.PACKET_NO,
                             PACKET_QTY = t.PACKET_QTY,
                             PACKET_QTY2 = t.PACKET_QTY2,
                             ProduceNAME = t.ProduceNAME,
                             SIZE = t.SIZE,
                             STANDARD = t.STANDARD,
                             STOCK_ID = t.STOCK_ID,
                             STOCK_NAME = t.STOCK_NAME,
                             STOCK_TYPE = t.STOCK_TYPE,
                             SUB_LOT_NUMBER = t.SUB_LOT_NUMBER,
                             SupplyLotNumber = t.SupplyLotNumber,
                             UnitName = t.UnitName,
                             WeightName = t.WeightName,
                             StockType = Enum.GetName(typeof(Enumerations.StockType), t.STOCK_TYPE)
                         };
            return source;
        }
    }
}
